home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SNMPLAP.h
-
- Contains: Simple Network Management Protocol C interface for Link Access Protocols
-
- Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
-
- */
-
- typedef struct LAPMIBStats
- {
- unsigned long ifVersion; /* Version of LinkStats we support */
- Str255 ifDescr; /* String with info about interface */
- unsigned long ifType; /* Code with type of interface */
- unsigned long ifMaxMTU; /* Largest size of IP datagram that can be tx/recv */
- unsigned long ifSpeed; /* Bandwidth in bits/second */
- Str31 ifPhysAddress; /* Interface address */
- unsigned long ifAdminStatus; /* Desired state (1 = up, 2 = down, 3 = testing) */
- unsigned long ifOperStatus; /* Current state (1 = up, 2 = down, 3 = testing) */
- unsigned long ifLastChange; /* SysTicks when interface entered current operation state */
- unsigned long ifInOctets; /* Total nbr bytes received including framing chars*/
- unsigned long ifInUcastPkts; /* Nbr of unicast packets received */
- unsigned long ifInNUcastPkts; /* Nbr of broad/multi cast packets received */
- unsigned long ifInDiscards; /* Nbr of overwrites that occured */
- unsigned long ifInErrors; /* Nbr of pkts recv which contain error */
- unsigned long ifInUnknownProtos; /* Nbr of pkts recv discarded cuz of unknown protocol */
- unsigned long ifOutOctets; /* Total nbr bytes tx including framing chars */
- unsigned long ifOutUcastPkts; /* Nbr of unicast packets tx */
- unsigned long ifOutNUcastPkts; /* Nbr of broad/multi cast packets tx */
- unsigned long ifOutDiscards; /* Nbr tx pkts discarded */
- unsigned long ifOutErrors; /* Nbr tx pkts not sent due to error */
- unsigned long ifOutQLen; /* Current nbr of packets in output queue */
- };
-
- typedef struct LAPMIBStats LAPMIBStats;
-
-
- /* ifAdminStatus and ifOperStatus */
- enum
- {
- ifStatusUp = 1,
- ifStatusDown = 2,
- ifStatusTesting = 3
- };
-
-
- /* IfTypes */
- enum
- {
- other = 1, /* none of the following */
- regular1822 = 2,
- hdh1822 = 3,
- ddn_x25 = 4,
- rfc877_x25 = 5,
- ethernet_csmacd = 6,
- iso88023_csmacd = 7,
- iso88024_tokenBus = 8,
- iso88025_tokenRing = 9,
- iso88026_man = 10,
- starLan = 11,
- proteon_10Mbit = 12,
- proteon_80Mbit = 13,
- hyperchannel = 14,
- fddi = 15,
- lapb = 16,
- sdlc = 17,
- ds1 = 18, /* T-1 */
- e1 = 19, /* european equivalent of T-1 */
- basicISDN = 20,
- primaryISDN = 21,
- propPointToPointSerial = 22, /* proprietary serial */
- ppp = 23,
- softwareLoopback = 24,
- eon = 25, /* CLNP over IP */
- ethernet_3Mbit = 26,
- nsip = 27, /* XMS over IP */
- slip = 28, /* generic SLIP */
- ultra = 29, /* ULTRA technologie
- ds3 = 30, /* T-3 */
- sip = 31, /* SMDS */
- frame_relay = 32
- };
-
-
- /*----------------------------------
- EtherNet (802.3) SNMP equates
- ----------------------------------*/
-
- typedef struct Dot3Entry
- {
- unsigned long dot3Version; /* Version of LapDot3 entry that we support */
- unsigned long dot3Index; /* ifIndex for this driver */
- unsigned long dot3InitializeMac; /* Init status (1 = inited, 2 = uninited) */
- unsigned long dot3MacSubLayerStatus; /* Op status of the MAC sublayer (1 = enabled, 2 = disabled) */
- unsigned long dot3MulticastReceiveStatus; /* Multicast receive status (1 = enabled, 2 = disabled) */
- unsigned long dot3TxEnabled; /* MAC frame tx state (1 = enabled, 2 = disabled) */
- unsigned long dot3TestTdrValue; /* Time between TDR start/end */
- };
-
- typedef struct Dot3Entry Dot3Entry;
-
- typedef struct Dot3EntryControl
- {
- unsigned long dot3EntryControlType;
- union
- {
- unsigned long dot3Index;
- unsigned long dot3InitializeMac;
- unsigned long dot3MacSubLayerStatus;
- unsigned long dot3MulticastReceiveStatus;
- unsigned long dot3TxEnabled;
- unsigned long dot3TestTdrValue;
- } IfExtended;
- };
-
- typedef struct Dot3EntryControl Dot3EntryControl;
-
- typedef struct Dot3StatsEntry
- {
- unsigned long dot3StatsVersion; /* Version number */
- unsigned long dot3StatsIndex; /* Same as ifIndex (to be left at zero) */
- unsigned long dot3StatsAlignmentErrors;
- unsigned long dot3StatsFCSErrors;
- unsigned long dot3StatsSingleCollisionFrames;
- unsigned long dot3StatsMultipleCollisionFrames;
- unsigned long dot3StatsSQETestErrors;
- unsigned long dot3StatsDeferredTransmissions;
- unsigned long dot3StatsLateCollisions;
- unsigned long dot3StatsExcessiveCollisions;
- unsigned long dot3StatsInternalMacTransmitErrors;
- unsigned long dot3StatsCarrierSenseErrors;
- unsigned long dot3StatsExcessiveDeferrals;
- unsigned long dot3StatsFrameTooLongs;
- unsigned long dot3StatsInRangeLengthErrors;
- unsigned long dot3StatsOutOfRangeLengthFields;
- unsigned long dot3StatsInternalMacReceiveErrors;
- };
-
- typedef struct Dot3StatsEntry Dot3StatsEntry;
-
- typedef struct Dot3CollEntry
- {
- unsigned long dot3CollVersion; /* Version number */
- unsigned long dot3CollIndex; /* Same as ifIndex (to be left at zero) */
- unsigned long dot3CollCount;
- unsigned long dot3CollFrequencies;
- };
-
- typedef struct Dot3CollEntry Dot3CollEntry;
-
- /*----------------------------------
- TokenRing (802.5) SNMP equates
- ----------------------------------*/
-
- typedef struct Dot5Entry
- {
- unsigned long dot5Version; /* Version of LapDot5 entry that we support */
- unsigned long dot5Index; /* ifIndex for this driver */
- unsigned long dot5Commands; /* always reads as no_op (1) */
- unsigned long dot5RingStatus;
- unsigned long dot5RingState;
- unsigned long dot5RingOpenStatus;
- unsigned long dot5RingSpeed;
- Str31 dot5UpStream;
- unsigned long dot5ActMonParticipate;
- unsigned long dot5Functional;
- };
-
- typedef struct Dot5Entry Dot5Entry;
-
- typedef struct Dot5EntryControl
- {
- unsigned long dot5EntryControlType;
- union
- {
- unsigned long dot5Index;
- unsigned long dot5Commands;
- unsigned long dot5RingStatus;
- unsigned long dot5RingState;
- unsigned long dot5RingOpenStatus;
- unsigned long dot5RingSpeed;
- Str31 dot5UpStream;
- unsigned long dot5ActMonParticipate;
- unsigned long dot5Functional;
- } IfExtended;
- };
-
- typedef struct Dot5EntryControl Dot5EntryControl;
-
- typedef struct Dot5StatsEntry
- {
- unsigned long dot5StatsVersion; /* Version number */
- unsigned long dot5StatsIndex; /* Same as ifIndex (to be left at zero) */
- unsigned long dot5StatsLineErrors;
- unsigned long dot5StatsBurstErrors;
- unsigned long dot5StatsACErrors;
- unsigned long dot5StatsAbortTransErrors;
- unsigned long dot5StatsInternalErrors;
- unsigned long dot5StatsLostFrameErrors;
- unsigned long dot5StatsReceiveCongestions;
- unsigned long dot5StatsFrameCopiedErrors;
- unsigned long dot5StatsTokenErrors;
- unsigned long dot5StatsSoftErrors;
- unsigned long dot5StatsHardErrors;
- unsigned long dot5StatsSignalLoss;
- unsigned long dot5StatsTransmitBeacons;
- unsigned long dot5StatsRecoverys;
- unsigned long dot5StatsLobeWires;
- unsigned long dot5StatsRemoves;
- unsigned long dot5StatsSingles;
- unsigned long dot5StatsFreqErrors;
- };
-
- typedef struct Dot5StatsEntry Dot5StatsEntry;
-
- typedef struct Dot5TimerEntry
- {
- unsigned long dot5TimerVersion; /* Version number */
- unsigned long dot5TimerIndex; /* Same as ifIndex (to be left at zero) */
- unsigned long dot5TimerReturnRepeat;
- unsigned long dot5TimerHolding;
- unsigned long dot5TimerQueuePDU;
- unsigned long dot5TimerValidTransmit;
- unsigned long dot5TimerNoToken;
- unsigned long dot5TimerActiveMon;
- unsigned long dot5TimerStandbyMon;
- unsigned long dot5TimerErrorReport;
- unsigned long dot5TimerBeaconTransmit;
- unsigned long dot5TimerBeaconReceive;
- };
-
- typedef struct Dot5TimerEntry Dot5TimerEntry;
-
-
- /* dot3InitializeMac */
- enum
- {
- dot3initialized = 1,
- dot3uninitialized = 2
- };
-
-
- /* dot3SubLayerStatus, dot3MulticastReceiveStatus */
- enum
- {
- dot3enabled = 1,
- dot3disabled = 2
- };
-
-
- /* dot3TxEnabled, dot5ActMonParticipate */
- enum
- {
- dot_true = 1,
- dot_false = 2
- };
-
-
- /* dot5Commands */
- enum
- {
- dot5no_op = 1,
- dot5open = 2,
- dot5reset = 3,
- dot5close = 4
- };
-
-
- /* dot5RingState */
- enum
- {
- opened = 1,
- closed = 2,
- opening = 3,
- closing = 4,
- openFailure = 5,
- ringFailure = 6
- };
-
-
- /* dot5RingOpenStatu
- enum
- {
- noOpen = 1,
- badParam = 2,
- lobeFailed = 3,
- signalLoss = 4,
- insertionTimeout = 5,
- ringFailed = 6,
- beaconing = 7,
- duplicateMAC = 8,
- requestFailed = 9,
- removeReceived = 10,
- ringopen = 11
- };
-
-
- /* dot5RingSpeed */
- enum
- {
- unknown = 1,
- oneMegabit = 2,
- fourMegabit = 3,
- sixteenMegabit = 4
- };
-
-
- #define SNMPVersion 0x100 /* used for LAPMIBStats, Dot3Stats, Dot3Entry */